namespace Domain.Migrations
{
    using System.Data.Entity.Migrations;

    public partial class init : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.Config",
                c => new
                {
                    Key = c.String(nullable: false, maxLength: 50),
                    Title = c.String(maxLength: 50),
                    Value = c.String(nullable: false, maxLength: 500),
                    Description = c.String(maxLength: 100),
                    IsForbidden = c.Boolean(),
                    CreateUser = c.String(maxLength: 50),
                    ModifyUser = c.String(maxLength: 50),
                    ModifyTime = c.DateTime(),
                })
                .PrimaryKey(t => t.Key);

            CreateTable(
                "dbo.Test",
                c => new
                {
                    TestId = c.String(nullable: false, maxLength: 32),
                    Name = c.String(maxLength: 25),
                    Value = c.String(maxLength: 25),
                    Description = c.String(maxLength: 100),
                    TempOne = c.String(maxLength: 50),
                    TempTwo = c.String(maxLength: 50),
                    TempThree = c.String(maxLength: 50),
                    TempFour = c.String(maxLength: 50),
                    TempFive = c.String(maxLength: 50),
                    ModifyTime = c.DateTime(),
                })
                .PrimaryKey(t => t.TestId);

            CreateTable(
                "dbo.UserInfo",
                c => new
                {
                    UserInfoId = c.String(nullable: false, maxLength: 32),
                    LoginName = c.String(nullable: false, maxLength: 25),
                    LoginPassword = c.String(nullable: false, maxLength: 25),
                    Sex = c.Boolean(),
                    Birthday = c.DateTime(),
                    Age = c.Int(),
                    Email = c.String(maxLength: 100),
                    Phone = c.String(maxLength: 100),
                    Homeplace = c.String(maxLength: 25),
                    Address = c.String(maxLength: 100),
                    Nickname = c.String(maxLength: 25),
                    Headphoto = c.String(maxLength: 300),
                    QQ = c.String(maxLength: 25),
                    Hobby = c.String(maxLength: 50),
                    Sign = c.String(maxLength: 50),
                    LastLoginTime = c.DateTime(),
                    LastLoginIp = c.String(maxLength: 25),
                    IsForbidden = c.Boolean(),
                    IsSuper = c.Boolean(),
                    ModifyTime = c.DateTime(),
                })
                .PrimaryKey(t => t.UserInfoId);

        }

        public override void Down()
        {
            DropTable("dbo.UserInfo");
            DropTable("dbo.Test");
            DropTable("dbo.Config");
        }
    }
}
